package com.company;
class Box<T>{
//    Alt+insert 定义
    public T getContent() {
        return content;
    }

    public void setContent(T content) {
        this.content = content;
    }

    private T content;
}

public class TDemo {
    public static void main(String[] args) {
        Box<String> box=new Box<String>();
        box.setContent("hello");
        String content=box.getContent();
        System.out.println(content);

        Box<Integer> box2=new Box<Integer>();
        box2.setContent(5);
        Integer content2=box2.getContent();
        System.out.println(content);

        Box<Double> boxx3=new Box<Double>();
        boxx3.setContent(1.2);
        Double r=boxx3.getContent();
        System.out.println(r);
    }
}
